﻿<div id="header">
    <div class="header-container layout">
        <div class="fd-clr" id="masthead-v5">
            <div class="ali-logo-v5">
                <a title="" class="main-logo-v5" href="@Url.RouteUrl("CPP_default", new { controller="Default",action="Index"})">
                    <img
                        width="198" height="79" alt="" src="@Url.Content("~/Areas/CPP/Images/w-logo.png")"></a>
            </div>
            <div class="masthead-right">
                <div class="ali-search-v5" style="margin-top: 10px;">
                    <form id="filterform" action="@Url.Action("FilterProducts", "CProduct")" autocomplete="off">
                        <fieldset>
                            <legend>搜索</legend>
                            <ul class="alisearch-type-v5 fd-clr" id="searchTypes">
                                <li class="first @ViewBag.PCurrent">
                                    <a title="产品" href="#">产品</a>
                                </li>
                                <li class="current-next @ViewBag.CCurrent">
                                    <a title="企业" href="#">企业</a>
                                </li>
                                <li class="current-next @ViewBag.DCurrent" style="padding:0 15px;">
                                    <a title="市场动态" href="#">市场动态</a>
                                </li>
                                <li class="current-next @ViewBag.ZCurrent" style="padding:0 15px;">
                                    <a title="文化徽商" href="#">文化徽商</a>
                                </li>
                                <li class="current-next @ViewBag.SCurrent" style="padding:0 15px;">
                                    <a title="商会类目" href="#">商会类目</a>
                                </li>
                            </ul>
                            <input id='dt' type='hidden' name='aid' value='DT' />
                            <input id="hfilterType" type="hidden" name="filterType" value="@ViewBag.filterType" />
                            
                            <div class="alisearch-container-v5">
                                <div class="alisearch-keywords-v5" style="width:360px;">
                                    <input name="filters"
                                        id="keywordinput"
                                        accesskey="s"
                                           maxlength="50"
                                        data-msg ="请输入产品关键字"
                                        value="@ViewBag.filters"
                                        autocomplete="off">
                                </div>
                                <div class="alisearch-action-v5">
                                    <button class="alisearch-textbotton" type="submit">
                                        搜索 
                                    </button>
                                </div>
                            </div>
                        </fieldset>
                    </form>
                </div>
                @*<div class="alisearch-top">
                            <p>让卖家找上门</p>
                            <a title="发布询价单" href="#"
                                target="_self">
                                <p class="more">发布询价单</p>
                            </a>
                        </div>*@
            </div>

        </div>
    </div>
</div>
<script src="/Scripts/jquery.watermark-2.0.min.js"></script>
<script type="text/javascript">
    $(function () {
        
        $("#keywordinput").watermark($("#keywordinput").data("msg"));

        $("#searchTypes li").click(function () {
            $("#searchTypes li").removeClass("current");
            $(this).addClass("current");
            $("#keywordinput").val("");
            if ($(this).find("a").attr("title") == "企业") {
                $("#keywordinput").data("msg", "请输入企业名称")
                $("#hfilterType").val(2);
                $("#filterform").attr("action", "@Url.Action("FilterProducts", "CProduct")");
            } else if ($(this).find("a").attr("title") == "产品") {
                $("#keywordinput").data("msg", "请输入产品关键字")
                $("#hfilterType").val(1);
                $("#filterform").attr("action", "@Url.Action("FilterProducts", "CProduct")");
            } else if ($(this).find("a").attr("title") == "商会类目") {
                $("#keywordinput").data("msg", "请输入类目关键字")
                $("#hfilterType").val(9);
                $("#filterform").attr("action", "@Url.Action("FilterProducts", "CProduct")");
            }
            else if ($(this).find("a").attr("title") == "市场动态") {
                $("#keywordinput").data("msg", "请输入您想要查询的信息")
                $("#hfilterType").val(3);
                $("#filterform").attr("action", "@Url.Action("Index", "CArticle")");
                
            } else if ($(this).find("a").attr("title") == "文化徽商") {
                $("#keywordinput").data("msg", "请输入您想要查询的信息")
                $("#hfilterType").val(4);
                $("#filterform").attr("action", "@Url.Action("Filters", "CArticle")");
            }
            $("#keywordinput").watermark($("#keywordinput").data("msg"));
        });
    });

</script>
<style type="text/css">
input[type=text] {
   color: #000;
}
.watermark {
   color: #999;
}
</style>